<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<link rel="stylesheet" href="../content/LatestLike.css">
	</head>
	<body>
		
		<div id="View_LastesLike_Main">
			<div class="LastesLikeCount">
				<span>最新点赞数:{{LatestLikeList.length}}</span>
				<sub>退出该页面会清空</sub>
			</div>
			
			<ul class="LastesLikeList">
				<li v-for="item in LatestLikeList" :class="item.isClassification==0?'LastesLike_Li IsArt':'LastesLike_Li IsCom'">
					<div class="avatar" :style="'background-image: url('+item.avatar"></div>
					<div class="details">
						<span><label>{{item.nickName}}</label><b>&nbsp在&nbsp</b>{{item.likeId}}<b>&nbsp点赞了您的&nbsp</b>{{item.isClassification==0?"文章":"评论"}}</span>
						<div>
							<span><b>{{item.isClassification==0?"文章标题是 : ":"评论内容是 : "}}</b>{{item.isClassification==0?item.title:item.context}}</span>
							<span>点击前往</span>
						</div>
					</div>
				</li>
			</ul>
			
			<div class="returnUser">
				<a href="UserArticle.html">返回个人页</a>
			</div>
			
			
		</div>
		
		<script src="../javaScript/vue.js"></script>
		<script src="../javaScript/jquery-3.5.1.min.js"></script>
		
		<script>
			var View_LastesLike_Main_Vue = new Vue({
				el:"#View_LastesLike_Main",
				data:{
					LatestLikeList : []
				},
				methods:{
					
				}
			});
			$(function(){
				var thisVue = View_LastesLike_Main_Vue.$data;
				//获取用户最新消息
				var token = localStorage.getItem("ArticleUserId");
				if (token == null) {
					location = "./LogIn.html";
					return;
				}
				$.get("https://localhost:44356/api/Latest/GetLike", {
					Token: token
				}, function(data) {
					console.log(data);
					if (data.statusCode == 0)
						thisVue.LatestLikeList = data.result;
				})
			})
		</script>
	</body>
</html>
